package com.liang.threaddemo2;

public class Demo {
    public static void main(String[] args) {
        //创建一个runnable接口的实现类
        MyRunnable mr = new MyRunnable();
        //创建线程对象
        Thread tr = new Thread(mr);
        tr.setName("虎子");
        tr.start();

        //创建一个runnable接口的实现类
        MyRunnable mr2 = new MyRunnable();
        //创建线程对象
        Thread tr2 = new Thread(mr);
        tr2.setName("跳跳");
        tr2.start();

    }
}
